<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>drugBuy</title>
	<script src=" ../../js/jquery-3.3.1.js"   type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="../../css/bootstrap.css" type="text/css" />
	<script src="../../js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
	<style>
		* {
			margin: 0 auto;
			padding: 0;
		}
	
		#a {
			width: 1000px;
			height: 800px;
			background-image: url(../../img/2.jpg);
			background-size: 100% 100%;
			background-repeat: no-repeat;
		}
	.table{
		height: 300px;
		display: inline-block;
		color: white;
		margin-top: 20px;
		margin-left: 350px;
		border: none;
	}
	th,td{
		text-align: center;
	}
	h1{
		color: white;
		display: inline-block;
		margin-top: 200px;
		margin-left: 350px;
		text-align: center;
		font-weight: 500;
		letter-spacing:50px;
	}
	.c{
		color: #000000;
	}
	</style>
</head>
<body>
<div id="a">
		<h1>药品清单</h1>
<table class="table table-bordered">
    
    <tr>
		<th>序号</th>
        <th>药品名称</th>
        <th>数量</th>
        <th>单价</th>
    </tr> 
	<form action="/bill/buy" method="post">
    <c:forEach items="${drugs}" var="drug" varStatus="status">
			<tr>
            <td><input type="text"value="${status.index+1}" style="border: 0px;width:15px" name="id" class="c"/>
            <td>${drug.dname}</td>
            <td><input type="number" min="0" max="${drug.num}" name="many" value="${many}" class="c" />
            <td>${drug.sprice}</td>
            </tr>
			</c:forEach>
		<input type="submit" value="确认"></a>
		</form>
    
</table>
	</div>
</body>
</html>